<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><s:text name="context.title"/></title>
<%@ include file="/common/meta.jsp"%>
  <link rel="stylesheet" href="${ctx}/js/cluetip/jquery.cluetip.css" type="text/css" />

<script src="${ctx}/js/cluetip/jquery.cluetip.min.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">

          var pageTotalPages = "1";
          var pageNo = "";
        $(document).ready(function() {
        	
        	  $('#sticky').cluetip({sticky: true, closePosition: 'title', arrows: true ,ajaxCache:false});
        	var pageTotalPages = $("#pageTotalPages").val();
            var pageNo = $("#pageNo").val();
            $("#pager").pager({ pagenumber: pageNo, pagecount: pageTotalPages, buttonClickCallback: PageClick });
        });

        PageClick = function(pageclickednumber) {
            $("#pager").pager({ pagenumber: pageclickednumber, pagecount: pageTotalPages, buttonClickCallback: PageClick });
           // $("#result").html("Clicked Page " + pageclickednumber);
            jumpPage(pageclickednumber);
        }

        function checkss(obj){
			if(obj.checked){
				$("#contentTables").find("input[type=checkbox]").attr("checked","checked");
			}else{
				$("#contentTables").find("input[type=checkbox]").removeAttr("checked")
			}

        }
    </script>
</head>
<body>
<form action="select-audit" method="post" id="mainForm">
<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
<input type="hidden" name="page.order" id="order" value="${page.order}"/>
<input type="hidden" id="pageTotalPages"  value="${page.totalPages}"/>
<br/>
<p align="center"><s:actionmessage theme="mytheme" cssClass="actionMessage"/></p>
<h1 class="title01"><img src="${ctx}/images/02_15.gif" width="45" height="42" class="fl"/>审核选题</h1>
<fieldset class="fs_ys" style="width: 800px">
<legend>查询</legend>
<table align="center" id="contentTable" class="table_ys_input" >
	<tr>
		<td nowrap>教师姓名&nbsp;</td>
		<td><input type="text" name="teacherName" value="${teacherName}"/></td>
		<td nowrap>题目名称&nbsp;</td>
		<td colspan="">
			<input type="text" name="titile" value="${titile}"/>
		&nbsp;</td>
        <td><center><input type="submit"  value="     查询 "/></center></td>
	</tr>
</table>

</fieldset>
<s:if test="page!= null && page.result.size() != 0">
<table id="contentTables" class="table_ys tableColor">
	<tr>
		<th nowrap="nowrap" colspan="">序号</th>
		<th nowrap="nowrap"><input type="checkbox"  onclick="checkss(this)"/></th>
		<th nowrap="nowrap"><a href="javascript:sort('titile','asc')">题目</a></th>
		<th nowrap="nowrap"><a href="javascript:sort('teacherName','asc')">教师名称</a></th>
		<th nowrap="nowrap">教师职称</th>
		<th nowrap="nowrap">已选人数</th>
		<th nowrap="nowrap">选题学生</th>
		<th nowrap="nowrap">操作</th>
	</tr>
	<s:iterator value="page.result" var="v" status="st">
		<s:if test="#v.studentNo != null">
	<tr>
		<td>${st.index + 1 }&nbsp;</td>
		<td><input type="checkbox" name="checkedIds" value="${v.id }"/>&nbsp;</td>
		<td><a class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" href="select!input?id=${v.id }">${v.titile }</a>&nbsp;</td>
		<td>${teacherName }&nbsp;</td>
		<td>${v.teacherPost }&nbsp;</td>
		<td>
			<s:property value="#v.students.size()"/>
		&nbsp;</td>
		<td>${v.studentName }&nbsp;</td>
		<td>
		<tc:timeControler authName="选 题">
			<a class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" href="select-audit!audit?id=${v.id }" onclick="return confirm('确定审核此题目？')">审核</a>
		</tc:timeControler>
		&nbsp;</td>
	</tr>
	</s:if>
	</s:iterator>
	<tr>
		<td colspan="8">
		<tc:timeControler authName="选 题">
			<input type="submit" name="method:multAudit" value="   批量审核" onclick="return confirm('确定审核已选的？')"/>
		</tc:timeControler>
		&nbsp;</td>
	</tr>
</table>
<div align="center" id="pager" ></div>
</s:if>
</form>
</body>

</html>